import { observable } from 'mobx-miniprogram'

export const store = observable({
  testList: [],
  resultList: [],
  categoryImg: [],

  get sum() {
    const count = 0
    this.testList.forEach((item, index) => {
      if (item.category === this.resultList[index].category) {
        count++
      }
    })
    return count
  },
  get imgList() {
    let list = []
    this.categoryImg.forEach((item,index) => {
      list[index] = item.image
    })
    return list
  }
})